-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix another sync issue with native clients #5259
Conversation
In theory we should change the column type from Nullable to not Nullable and have all |
Why would it help to make it not nullable? If the DB value is null, it already gets converted to It seems to me it would be cleaner to add |
I do not understand why to keep something nullable when it shouldn't. |
Bitwarden most likely had it nullable in their schema originally. Also null can be useful for indicating "use the default value", which might change over time. |
Since Bitwarden doesn't have it nullable anymore kinda indicates it has a default of 0/None already. Also, as that is the sane default i do not expect it to be changed. Else we could make all lot more nullable of course. While that might also be beneficial for the database maybe regarding storage, it doesn't make it easier to query it. It will then always need two compares. Anyways, it doesn't really matter for now. More for the fixing the database defaults, and fix formats instead of doing that during sync all the time. Logging invalid values btw doesn't really help here. It might have been broken clients or even non official clients which provided wrong values. It just needs to be fixed. |
Took some look again. But adding |
The `reprompt` value somehow sometimes has a value of `4`. This isn't a valid value, and doesn't cause issues with other clients, but the native clients are more strict. This commit fixes this by validating the value before storing and returning. Signed-off-by: BlackDex <[email protected]>
I also did some more detailed checking by validating https://github.com/bitwarden/android/blob/v2024.11.7/app/src/main/java/com/x8bit/bitwarden/data/vault/datasource/network/model/SyncResponseJson.kt with our code, and i think it is fine. The only thing i can see which is not the same is the attachment/send size, which we send as a String instead of an Int. But the none-native clients expected a String, and i think it will be converted correctly by the native clients. |
The
reprompt
value somehow sometimes has a value of4
. This isn't a valid value, and doesn't cause issues with other clients, but the native clients are more strict.This commit fixes this by validating the value before storing and returning.
Fixes #5237